package com.qq.afterSaleSystem.service.serviceImpl;

import com.qq.afterSaleSystem.dao.ShopMaintainMapper;
import com.qq.afterSaleSystem.entity.Apply;
import com.qq.afterSaleSystem.entity.ShopMaintain;
import com.qq.afterSaleSystem.entity.MaintainMoney;
import com.qq.afterSaleSystem.entity.Part;
import com.qq.afterSaleSystem.service.ShopMaintainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopMaintainServiceImpl implements ShopMaintainService {
    @Autowired
    ShopMaintainMapper shopMaintainMapper;

    @Override
    public List<ShopMaintain> getAll1() {

        return shopMaintainMapper.getAll1();
    }

    @Override
    public List<ShopMaintain> getNumOfMaintainTypeAndDo() {
        return shopMaintainMapper.getNumOfMaintainTypeAndDo();
    }

    @Override
    public List<ShopMaintain> getNumOfMaintainPerson() {
        return shopMaintainMapper.getNumOfMaintainPerson();
    }

    @Override
    public int addShopMaintain(ShopMaintain cmt) {
        int i = shopMaintainMapper.addShopMaintain(cmt);
        return i;
    }

    @Override
    public ShopMaintain shopMaintainById(Integer id) {
        return shopMaintainMapper.shopMaintainById(id);
    }

    @Override
    public int updateShopMaintain(ShopMaintain cmt) {
        return shopMaintainMapper.updateShopMaintain(cmt);
    }

    @Override
    public int deleteShopMaintain(Integer id) {
        return shopMaintainMapper.deleteShopMaintain(id);
    }

    @Override
    public List<Part> getPart() {
        return shopMaintainMapper.getPart();
    }

    @Override
    public int insertApply(Apply ap) {
        return shopMaintainMapper.insertApply(ap);
    }

    @Override
    public List<Apply> getApplyByCarId(Integer id) {
        return shopMaintainMapper.getApplyByCarId(id);
    }

    @Override
    public List<Apply> getAllApply() {
        return shopMaintainMapper.getAllApply();
    }

    @Override
    public int deleteApply(Integer id) {
        return shopMaintainMapper.deleteApply(id);
    }

    @Override
    public int updateApplyStateTo1(Integer id,String partsName) {
        return shopMaintainMapper.updateApplyStateTo1(id,partsName);
    }

    @Override
    public List<Apply> getAllApplyStateIs1() {
        return shopMaintainMapper.getAllApplyStateIs1();
    }

    @Override
    public int insertMaintainMoney(Integer id, String partsName, String time) {
        return shopMaintainMapper.insertMaintainMoney(id,partsName,time);
    }

    @Override
    public List<MaintainMoney> getMaintainMoneyByCarId(Integer id) {
        return shopMaintainMapper.getMaintainMoneyByCarId(id);
    }

    @Override
    public int updateMoneyById(MaintainMoney money) {
        return shopMaintainMapper.updateMoneyById(money);
    }

    @Override
    public MaintainMoney getMoneyById(Integer id) {
        return shopMaintainMapper.getMoneyById(id);
    }

}
